package com.starry.chat.logic.network

import com.starry.chat.logic.model.ChatResponseBean
import com.starry.chat.logic.model.ChatTokenBean
import okhttp3.RequestBody
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.Headers
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * Package:com.starry.chat.logic.network
 * Author:starr
 * Time:2024/4/6 16:20
 * Description:
 */
interface ChatService {


    /**
     * 文心一言APi
     */
    @Headers("Accept:application/json", "Content-Type:application/json")
    @POST("oauth/2.0/token")
    fun getBaiduToken(
        @Query("client_id") clientId: String?,
        @Query("client_secret") clientSecret: String?,
        @Query("grant_type") client_credentials: String?,
    ): Call<ChatTokenBean?>?


    @Headers("Accept:application/json", "Content-Type:application/json")
    @POST("/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant")
    fun startChat(
        @Body param: RequestBody?,
        @Query("access_token") accessToken: String?,
    ): Call<ChatResponseBean?>?
}